-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Fix errors related to navigation #1623
base: main
Are you sure you want to change the base?
Conversation
@@ -85,20 +88,20 @@ export default { | |||
this.setActiveTableId(parseInt(currentRoute.params.tableId)) | |||
this.setPageTitle(this.activeTable.title) | |||
if (!currentRoute.path.includes('/row/')) { | |||
this.switchActiveMenuEntry(document.querySelector('header .header-left .app-menu a[title="Tables"]')) | |||
this.switchActiveMenuEntry(document.querySelector(`header .header-start .app-menu a[href="${url}"]`)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have any other idea how to make it works for non-en locales - feel free to suggest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can looks like:
if (currentRoute.path.startsWith('/table/')) {
this.setActiveTableId(parseInt(currentRoute.params.tableId))
this.setPageTitle(this.activeTable.title)
if (!currentRoute.path.includes('/row/')) {
emit('nextcloud:app-menu.active', 'tables')
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started trying to also fix these errors at #1477. We've had to fix these multiple times whenever the classnames change, and have been thinking of a more stable solution. There's a suggestion #1477 (comment) to consider using a server API, that I'm yet to look at.
Signed-off-by: Kostiantyn Miakshyn <[email protected]>
dff1dbb
to
58b7100
Compare
Right now we have 2 annoying errors in console. This pr fixes both of them. Includes #1477.